1. Field of the Invention
The present disclosure relates generally to static code analysis in compilers and more specifically to optimizing the performance of a compiler by transforming the position of program code in a compiler.
2. Description of the Related Art
There are many different techniques used to optimize code in a compiler. Code may be removed, added, deleted, folded or rearranged. In some systems, a compiler may detect that moving code from one location in a program to another may generate more effective machine code. However, the existing code motion techniques for optimizing code have some limitations. For example, the conventional method to move code from definition site to use site may not be performed safely due to aliasing or the limited alias knowledge of the variables involved. There is a need for new and better ways of compiling instructions to move code from the use site to the definition site to allow for efficient operation.